import 'package:flutter_wan_android/view_model/locale_model.dart';
import 'package:flutter_wan_android/view_model/theme_model.dart';
import 'package:flutter_wan_android/view_model/user_model.dart';
import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart';

List<SingleChildWidget> providers = [...systemProviders, ...dependentServices];

/// 系统级别的Provider
List<SingleChildWidget> systemProviders = [
  ///应用主题
  ChangeNotifierProvider<ThemeModel>(
    create: (context) => ThemeModel(),
  ),

  ///语言设置
  ChangeNotifierProvider<LocaleModel>(
    create: (context) => LocaleModel(),
  ),

  ///用于喜爱
  // ChangeNotifierProvider<GlobalFavouriteStateModel>(
  //   create: (context) => GlobalFavouriteStateModel(),
  // )
];

/// 需要依赖的model
///
/// UserModel依赖globalFavouriteStateModel
List<SingleChildWidget> dependentServices = [
  ChangeNotifierProvider<UserModel>(
    create: (context) => UserModel(),
  )
];
